package com.zhangzhan.gulimallproduct.feign.fallback;

import com.alibaba.fastjson.JSON;
import com.zhangzhan.gulimallcommcon.util.R;
import com.zhangzhan.gulimallproduct.feign.SeckillFeignService;
import com.zhangzhan.gulimallproduct.vos.SkuSeckillTo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author 张一恒
 * @version 1.0
 * @description:
 * @date 2024/7/6 12:40
 */
@Component
@Slf4j
public class SeckillFeignFallback implements SeckillFeignService {
    @Override
    public List<SkuSeckillTo> getSkuCeckill(Long skuId) {
        R error = R.error(HttpStatus.INTERNAL_SERVER_ERROR.value(), HttpStatus.INTERNAL_SERVER_ERROR.getReasonPhrase());
        log.error(JSON.toJSONString(error));
        return null;
    }
}
